package com.hqyj.controller;

import com.hqyj.pojo.Menu;
import com.hqyj.pojo.Tables;
import com.hqyj.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;


@RestController
@RequestMapping("/hotel_menu")
public class MenuController {
    @Autowired
    MenuService menuService;

    //加载表格数据
    @RequestMapping("/hotel_menuList")
    public HashMap<String,Object> listPage(Menu m){
        return menuService.select(m);
    }

    //修改
    @RequestMapping("/update")
    public HashMap<String,Object>  update(Menu m){
        return menuService.update(m);
    }

    //新增
    @RequestMapping("/add")
    public HashMap<String,Object> add(Menu m){
        return menuService.add(m);
    }

    //删除
    @RequestMapping("/del")
    public HashMap<String,Object> del(Integer id){ return menuService.del(id); }

    //顾客预定显示
    @RequestMapping("/tList")
    public HashMap<String,Object> tList(Menu m){
        return menuService.tList(m);
    }
}
